/* 现代化UI样式 - 全局样式增强 */

/* 玻璃态效果基础类 */
.glass-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 20px;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.12),
    0 1px 0 rgba(255, 255, 255, 0.7) inset;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  position: relative;
  overflow: hidden;
}

.glass-card:hover {
  box-shadow:
    0 25px 70px rgba(0, 0, 0, 0.15),
    0 1px 0 rgba(255, 255, 255, 0.8) inset;
  transform: translateY(-3px);
}

.glass-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(24, 144, 255, 0.05) 0%, rgba(82, 196, 26, 0.05) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.glass-card:hover::before {
  opacity: 1;
}

/* 现代化渐变背景 */
.modern-gradient-bg {
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  position: relative;
  min-height: 100vh;
}

.modern-gradient-bg::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(circle at 20% 50%, rgba(120, 119, 198, 0.03) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.03) 0%, transparent 50%),
    radial-gradient(circle at 40% 80%, rgba(120, 219, 255, 0.03) 0%, transparent 50%);
  pointer-events: none;
}

/* 优雅的渐变背景变体 */
.elegant-gradient-bg {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  position: relative;
  min-height: 100vh;
}

.elegant-gradient-bg::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(circle at 30% 40%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 70% 80%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
  pointer-events: none;
}

/* 现代化按钮样式 */
.modern-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  border-radius: 12px;
  padding: 12px 24px;
  color: white;
  font-weight: 600;
  font-size: 14px;
  box-shadow:
    0 8px 24px rgba(102, 126, 234, 0.4),
    0 1px 0 rgba(255, 255, 255, 0.2) inset;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.modern-btn:hover {
  transform: translateY(-2px);
  box-shadow:
    0 12px 32px rgba(102, 126, 234, 0.5),
    0 1px 0 rgba(255, 255, 255, 0.3) inset;
}

.modern-btn:active {
  transform: translateY(0);
}

.modern-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.modern-btn:hover::before {
  left: 100%;
}

/* 现代化表格样式增强 */
.modern-table .ant-table {
  background: transparent;
  border-radius: 16px;
  overflow: hidden;
}

.modern-table .ant-table-thead > tr > th {
  background: linear-gradient(135deg, rgba(24, 144, 255, 0.1) 0%, rgba(82, 196, 26, 0.1) 100%);
  backdrop-filter: blur(10px);
  border: none;
  font-weight: 700;
  font-size: 14px;
  color: #1a1a1a;
  padding: 20px 16px;
  position: relative;
}

.modern-table .ant-table-thead > tr > th::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #1890ff, #52c41a);
}

.modern-table .ant-table-tbody > tr {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.modern-table .ant-table-tbody > tr:hover {
  background: rgba(255, 255, 255, 0.95);
  transform: translateY(-1px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.modern-table .ant-table-tbody > tr > td {
  border: none;
  padding: 16px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

/* 现代化表单样式 */
.modern-form .ant-form-item-label > label {
  font-weight: 600;
  color: #1a1a1a;
  font-size: 14px;
}

.modern-form .ant-input,
.modern-form .ant-input-number,
.modern-form .ant-select-selector {
  border-radius: 12px;
  border: 2px solid rgba(24, 144, 255, 0.2);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  padding: 12px 16px;
}

.modern-form .ant-input:focus,
.modern-form .ant-input-number:focus,
.modern-form .ant-select-focused .ant-select-selector {
  border-color: #1890ff;
  box-shadow: 0 0 0 4px rgba(24, 144, 255, 0.1);
  background: rgba(255, 255, 255, 1);
}

/* 现代化标签样式 */
.modern-tag {
  border-radius: 20px;
  padding: 6px 16px;
  font-weight: 600;
  font-size: 12px;
  border: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.modern-tag:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

/* 现代化模态框样式 */
.modern-modal .ant-modal-content {
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow:
    0 32px 80px rgba(0, 0, 0, 0.2),
    0 1px 0 rgba(255, 255, 255, 0.7) inset;
  overflow: hidden;
}

.modern-modal .ant-modal-header {
  background: linear-gradient(135deg, rgba(24, 144, 255, 0.1) 0%, rgba(82, 196, 26, 0.1) 100%);
  backdrop-filter: blur(10px);
  border: none;
  border-radius: 20px 20px 0 0;
  padding: 24px 32px;
}

.modern-modal .ant-modal-title {
  font-size: 20px;
  font-weight: 700;
  color: #1a1a1a;
}

.modern-modal .ant-modal-body {
  padding: 32px;
}

.modern-modal .ant-modal-footer {
  border: none;
  padding: 24px 32px 32px;
  background: rgba(248, 250, 252, 0.8);
}

/* 现代化分页样式 */
.modern-pagination .ant-pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 32px 0;
}

.modern-pagination .ant-pagination-item {
  border-radius: 12px;
  border: 2px solid rgba(24, 144, 255, 0.2);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.modern-pagination .ant-pagination-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(24, 144, 255, 0.3);
}

.modern-pagination .ant-pagination-item-active {
  background: linear-gradient(135deg, #1890ff, #52c41a);
  border-color: transparent;
  color: white;
}

/* 现代化统计卡片 */
.modern-stats-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 20px;
  padding: 24px;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.12),
    0 1px 0 rgba(255, 255, 255, 0.7) inset;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  position: relative;
  overflow: hidden;
}

.modern-stats-card:hover {
  transform: translateY(-5px);
  box-shadow:
    0 25px 70px rgba(0, 0, 0, 0.15),
    0 1px 0 rgba(255, 255, 255, 0.8) inset;
}

.modern-stats-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #1890ff, #52c41a, #faad14, #f759ab);
  border-radius: 20px 20px 0 0;
}

/* 动画效果 */
.fade-in-up {
  animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.slide-in-right {
  animation: slideInRight 0.5s ease-out;
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.scale-in {
  animation: scaleIn 0.4s ease-out;
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* 响应式优化 */
@media (max-width: 768px) {
  .glass-card {
    border-radius: 16px;
    margin: 0 8px;
  }

  .modern-btn {
    padding: 10px 20px;
    font-size: 13px;
  }

  .modern-modal .ant-modal-content {
    margin: 16px;
    border-radius: 16px;
  }

  .modern-stats-card {
    padding: 20px;
    border-radius: 16px;
  }
}

@media (max-width: 480px) {
  .glass-card {
    border-radius: 12px;
    margin: 0 4px;
  }

  .modern-modal .ant-modal-header,
  .modern-modal .ant-modal-body,
  .modern-modal .ant-modal-footer {
    padding: 16px 20px;
  }
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
  .glass-card {
    background: rgba(20, 20, 20, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
  }

  .modern-gradient-bg {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  }

  .modern-table .ant-table-tbody > tr {
    background: rgba(20, 20, 20, 0.8);
  }

  .modern-table .ant-table-tbody > tr:hover {
    background: rgba(30, 30, 30, 0.95);
  }

  .modern-form .ant-input,
  .modern-form .ant-input-number,
  .modern-form .ant-select-selector {
    background: rgba(20, 20, 20, 0.9);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.2);
  }

  .modern-stats-card {
    background: rgba(20, 20, 20, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
  }
}

/* 高性能动画优化 */
.glass-card,
.modern-btn,
.modern-table .ant-table-tbody > tr,
.modern-stats-card {
  will-change: transform, box-shadow;
}

/* 减少动画的性能影响 */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
